Copyright: Copyright 1994-1996, Software Engineering, Inc.


T_062111430001
Cron the Clock Daemon

For Microsoft® Windows™

Overview

Installation

Events

Event List

Setup

Message Log

Cron Schedule Files

Licensing and Authorization Codes

Purchasing a License

Software Engineering, Inc.

Potential Problems

Copyright Information

Copyright 1994-1996, Software Engineering, Inc.

All rights reserved.


Overview

Scheduling regular system events in Windows can be an impossible task.  In the Windows environment, applications that require scheduling are expected to provide this functionality themselves.  This requires each of these applications to run constantly in order to notice when their scheduled event must take place.  The average user probably does not want to keep a backup program running constantly so that it can make a system backup only once a week or once a month.  This lack of scheduling capability also makes it impossible to schedule an MS-DOS batch file or program for future execution.

The Cron program, also referred to as the Clock Daemon, was created by Software Engineering, Inc. to add this capability to Windows. The makers of Unix recognized the need for program scheduling and created an appropriate mechanism for doing so, dubbing it 'cron' or sometimes 'crond'.  Our Cron program was modeled after the Unix daemon of the same name.  This version, however, brings the friendliness of the Windows interface to this otherwise cryptic Unix utility. The name and basic functionality are the only similarities between the two programs. We did not use one line of code from the Unix version, electing instead to redevelop the software completely using the facilities available in the Windows C API. The result is a concise program that gets the job done efficiently, with an extremely minimal load on the Windows operating system.

Cron uses a powerful scheduling system to execute events at specified dates and times.  Any reasonable number of regularly scheduled events can be specified.  Events can include a combination of a command to execute, a WAV file to play, and/or a text message to display.

Cron is SHAREWARE.  It is NOT free or "public domain" software.  You are granted a 90 day trial period in which to evaluate the program.  By the end of this period you should have decided whether Cron suits your needs or not.  If not, simply stop using it.  If, on the other hand, you choose to continue using Cron, you must purchase a software license from Software Engineering, Inc.


Installation

The Cron program, given the nature of what it does, should be set up to run whenever Windows is running.  This is usually accomplished by creating an Item entry in the StartUp group of the Program Manager.

Cron is easy to install, requiring no particular path or directory structure.  The following steps describe how to install the program.

1. Using the File Manager, copy the CRON.EXE file to a directory on your hard drive.  It does not have to be in your path.

2. Locate the CRON.EXE file on your hard drive using the File Manager.

3. Using the mouse, select and drag the CRON.EXE file from the file list in the File Manager and drop it in the StartUp group in the Program Manager.  Cron is now set up to run automatically whenever Windows is run.

4. Select the new Cron icon in the StartUp group of the Program Manager.

5. On the menu bar of the Program Manager, select File|Properties or press Alt-Enter.  This will bring up the Program Item Properties dialog for the Cron icon.

6. Turn on the checkbox labeled "Run Minimized" and then select OK.  Now Cron will run as an icon.

7.  To get Cron going right now, double click on the Cron icon in the StartUp group of the Program Manager.


Events

A Cron event is some task that must be executed at a future date and time.  This can include one-time events as well as events that must be repeated at regular intervals.  Examples include reminder messages, nightly software compiles/builds, hourly chimes, system backups, or even a tolling bell at midnight.

Events consist of a command to execute, a WAV file to play, and/or a text message to display.  Any combination of these three components can be used in a single event.

Events are added by selecting the Event|Add option on the Clock Daemon menu bar.  This will bring up the Add Event dialog.  This dialog consists of three sections, Description, Event, and Schedule.

Description

You must provide a description of each event.  This description will show up on the event list, discussed later.

Event

This section identifies the components of the event.  You must fill in at least one of the edit boxes in this section, labelled Command, WAV File, and Message.

•	Command - Specifies a command to execute.  This may contain command line options as well.  A Browse button is available for your convenience.

The command control is accompanied by a set of radio buttons for selecting the execution mode:

•	Execute Normally - The command is executed normally.

•	Run Minimized - The command is executed as an icon, if possible.

•	WAV File - Specifies a WAV file to play.  In order to play a WAV file, you must have a multi-media sound driver capable of playing WAV files installed in Windows.  A Browse button is available for your convenience.

•	Message - Specifies a text message associated with this event.  When the event goes off, this message will be added to the cron log and the log messages will be displayed.  The cron log and log messages menu are discussed later.

Schedule

This section specifies the time and date schedule for this event.  There are four edit boxes, labeled Hour, Minute, Month and Day, and a set of seven check boxes for the Day of Week.  Any combination of legal values can be used, offering a highly flexible and powerful scheduling system.  An additional check box labeled Disable Event can be selected to disable an event without removing it from the event list.

Values in the edit boxes can be expressed a number of ways.  An asterisk '*' is a wild card which indicates all possible values for a given field.  Multiple numeric values can be listed, separated by a comma; i.e. 3,6,9,12.  An inclusive range of values can be specified using a dash '-'; i.e. 15-30,45-59.  This syntax can of course be combined; i.e. 5,10,12-15,18-20,23.

Each edit control has a range of legal values.  Hour is 0 through 23, using a 24 hour clock to distinguish between AM and PM.  Minute is 0 through 59.  Month is 1 through 12.  The Day range is 1 through 31.

Event Examples

Here are some event examples.

Description: A meeting reminder on wednesdays at 7:30am.

WAV File: c:\windows\chime.wav

Message: Weekly status meeting.

Hour: 7

Minute: 30

Month: *

Day: *

Day of Week: Only Wednesday checked

Description: A nightly backup (during the week).

Command: c:\bat\mybackup.bat

Hour: 18

Minute: 15

Month: *

Day: *

Day of Week: Monday through Friday checked

Description: A tolling bell at midnight.

WAV File: c:\wav\belltoll.wav

Hour: 0

Minute: 0

Month: *

Day: *

Day of Week: All days checked


Event List

The event list is displayed in the Clock Daemon window.  This is a list of the events in the Cron schedule.  Information is displayed in two columns, labeled Type and Description.  In the Type column, each event will show a combination of EXE, WAV, and MSG, depending on which components make up the event.  The Description column will contain the text supplied in the Description box when the event was added or last modified.  Items are not listed in any particular order. An event that is disabled will be listed with a red line through it.

When an event is selected in the event list, it can then be deleted or modified using options on the Event menu on the Clock Daemon menu bar.  Double clicking on an item in the event list will bring up the Modify Event dialog, allowing you to inspect and modify the event.

Some keys on the keyboard can be used to manipulate the event list as well. The Insert key will add a new event. The Delete key will delete the selected event. The Enter key will modify the selected event.


Setup

The Clock Daemon has a few setup options which can be configured on the Cron Setup dialog. This dialog is displayed by selecting the File|Setup menu command.

Log File

•	Log File Name - This is the file to which Cron will append log messages.

•	Log All Events - This check box enables logging of all Cron events. When checked, a message will be added to the message log whenever a Cron event goes off, regardless of whether it included a text message.  Only events which include a text message will cause the Cron Event Messages dialog to appear, even if this option is enabled; other events are recorded quietly.

Window

These options apply when the Clock Daemon is running as a window.

•	Date - When checked, the current date will be displayed on the title bar.

•	Time - When checked, the current time will be displayed on the title bar.

Icon

This option applies when the Clock Daemon is running as an icon.

•	Date - When checked, the current date will be displayed under the icon.


Message Log

The message log is a text file.  The default log file is CRONLOG.TXT in your Windows directory.  When Cron events go off that include a text message, that message is appended to the log file and the Cron Event Messages dialog is displayed so you can read the event text.  The Cron Setup dialog option Log All Events, when checked, will result in a message being appended to this file whenever a Cron event goes off, regardless of whether it included a text message.  Only events which include a text message will cause the Cron Event Messages dialog to appear, even if Log All Events is enabled; other events are recorded quietly.

Cron does not care about the format of this file.  The only restriction is that each line should not exceed 255 characters.  In general, each line is thought of as a discrete entry.  Feel free to have other tasks add status information to this file.  An example might be to have a scheduled backup append a time stamped "Completed" message to this file when it's done.  Items added in this way will not cause the Cron Event Messages dialog to display.  If the dialog is already visible, new messages will appear within a few seconds of their addition to the log file.

The Cron Event Messages dialog shows the contents of the Cron log.  It is automatically displayed when an event goes off that contains a text message.  You can bring up this dialog manually by selecting the Event|Messages command from the menu bar.  When this dialog is visible, all new logged event messages will appear at the end of this list and scroll into view.

When viewing the Cron event log, you may select one or more list items and remove them from the Cron log by pressing the Delete Selected Messages button. You can erase the entire Cron log by pressing the Clear Log button. This simply deletes the current log file. It will automatically be recreated when needed by Cron.

Cron is distributed with a command line utility called LOGMSG.EXE. This command will echo a time stamped text message to the standard output device. This output can be redirected using standard shell output redirection characters. For example:

>LOGMSG Backup Completed > C:\WINDOWS\CRONLOG.TXT

Produces the following line in the log file:

  6/16/96 16:01 Backup Complete


Cron Schedule Files

You must save your event schedule in a file in order to retrieve it later. Cron will remember which schedule was used last and automatically reload it each time Cron is executed. Once loaded, Cron does not monitor the schedule file for changes. If an external program modifies the current Cron schedule file, Cron must be manually instructed to reload the file.

The File menu has options for saving and loading Cron schedules.  Cron schedule files have the .CRN file extension.  If you wish to save your current Cron schedule in a file, use the File|Save or File|Save As menu command.  To erase your current Cron schedule, select File|New.  To replace your current Cron schedule with a new one, use the File|Open command.  The File|Append command allows you to add a saved Cron schedule to the current schedule.

Command Line Option

The name of the Cron schedule file can be specified on the command line when Cron is executed. This schedule file will be loaded instead of the last used schedule file. Here is an example:

>CRON.EXE C:\SCHEDULES\MYSCHED.CRN


Licensing and Authorization Codes
Licensing and Passwords

Cron is distributed under the SHAREWARE concept.  This is NOT free or "public domain" software. Upon installation of Cron, you are allowed to use it free of charge for 90 days in order to try out the program. After evaluating the software, you should decide whether to continue using it or not.  If you choose to continue using the software, you must purchase a license. If you find that Cron does not meet your needs or does not perform to your expectations, simply remove it from your system. Unlike real daemons, this one's easy to banish.

Until you purchase a software license, the Cron Licensing dialog will appear every time you execute Cron. This serves as a reminder that you are only evaluating the software and have not yet purchased a license. When you purchase a license, you will be issued a software license number and password. These are entered into the Cron Licensing dialog, available by selecting File|Licensing from the Cron menu bar. Once your licensing information is accepted, Cron will run quietly and unobtrusively; no shareware or copyright messages of any kind will appear when Cron is executed.

The licensing information you receive is very important. This information is stored in your WIN.INI file. You should save your license number and password in a safe place in case you should have to reload your system in the future.

NOTE TO LICENSEES OF VERSION 1.7 AND PREVIOUS

Previous releases of Cron indicated that the licensing information would work on future revisions of the software, entitling the licensee to a free upgrade to future versions as they became available. This policy has been changed. In keeping with the agreement made with our existing customers, we will issue new licensing information to upgrade to this version at no charge. Simply submit your license number and we will promptly respond with updated licensing information. Thank you for your kind support.


Purchasing a License

A license to use Cron The Clock Daemon on your system can be purchased directly from Software Engineering, Inc.  The cost is $24.95 in U.S. dollars. Please send a check or money order; it is never wise to mail cash. We also accept MasterCard and Visa. No COD orders, please. We will issue your license number and password promptly by fax or e-mail if you provide your fax number or e-mail address.

You may use the following form when submitting your order:

Please send me ____ software licenses for Cron The Clock Daemon at just $24.95 each plus $3.95 shipping and handling for the first license. Add $1.00 shipping and handling for each additional license ordered. Please add 3.5% sales tax to deliveries to Colorado. Quantity orders of ten or more may deduct 10% from the licensing cost.

Company:_______________________________________

Name:__________________________________________

Address:_______________________________________

_______________________________________________

_______________________________________________

Phone:_________________________________________

Fax:___________________________________________

E-mail:________________________________________

Credit Card Information:

Master Card__	Visa__

Card Number

__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __

Name (As it appears on the card)

_________________________________________

Signature

_________________________________________

Enclosed is my payment to:

Software Engineering, Inc.

8352 S. Sunnyside Place

Highlands Ranch, Colorado 80126

303-470-7142, 303-470-1156 FAX

Cron@freehome.com

Federal Employer ID 84-1314332

Amount enclosed $__________


T_SOFTWARE_ENGINEERING
Software Engineering, Inc.

"Excellence By Design"

Software Engineering, Inc.

8352 S. Sunnyside Place

Highlands Ranch, Colorado 80126

303-470-7142, 303-470-1156 FAX

SEi@freehome.com

We are in the business of developing high quality software for Microsoft Windows, specializing in C and C++ object oriented design. Our highly skilled team of developers has many years of experience writing software. If you have software development needs, we have the resources to do the job for you.

The experience base at Software Engineering spans many hardware platforms (including mainframes) and operating systems, including Apple, Unix, DOS, and Windows (since version 1.0). We can port software to Microsoft Windows for you from many languages and platforms. We also have extensive experience in many specialized areas of programming, such as client/server applications, SQL, CAD, image processing, and network communications.

If you have serious work to do, give us a call or send some e-mail. Someone will be sure to get back to you.

Other Products From Software Engineering, Inc.

For information about other quality products from the good folks at Software Engineering, Inc., please refer to the file PRODUCTS.TXT included with your software distribution. This file will contain current product descriptions and pricing as of the release of this software.


Potential Problems

•	When running a DOS .BAT file, the settings in _DEFAULT.PIF are used. If the "Close Window on Exit" option is not checked, the inactive DOS window will remain after the task has finished. You can remedy this by changing the setting in _DEFAULT.PIF or by making a .PIF file for the .BAT file you are going to execute.

If you note any unusual or unexpected behaviour from this software, or just have some good suggestions, please feel free to tell us about it. We're friendly and always welcome hearing from the people who are using our products.


Copyright Information

Cron the Clock Daemon

Copyright 1994-1996, Software Engineering, Inc. All Rights Reserved.

Software Engineering, Inc. disclaims all warranties as to this software, whether express or implied, including without limitation any implied warranties of merchantability, fitness for a particular purpose, functionality, data integrity or protection.

Software Engineering, Inc. maintains a high standard of quality in its products. If you experience a problem that is related to our software, we will make a reasonable effort to solve it.